#!/bin/sh

DISTRIB_ID=$(grep DISTRIB_ID /etc/lsb-release|sed 's/^.*"\(.*\)"/\1/')
if [ x"${DISTRIB_ID}" == x"ManjaroLinux" ]; then
    yay -S fakeroot
    yay -S microsoft-edge-stable
else
    curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
    sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
    sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
    sudo rm microsoft.gpg
    sudo apt update
    sudo apt install -y microsoft-edge-stable
fi

